﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace QLSV
{
    class DAL_sinhvien
    {
        public DAL_sinhvien() { }
        public void InsertSinhvien(int masv, string tensv,string malop,string diachi )
        {

            SqlConnection conn = new SqlConnection();
            conn.ConnectionString = "Data Source=(local);Initial Catalog=qlsv; User Id=sa; Password=sa";
            conn.Open();
            SqlCommand cmd = new SqlCommand("insert into customers values(" + masv.ToString() + ",'" + tensv + "','"+malop+"','"+diachi+"')", conn);
            cmd.ExecuteNonQuery();
            conn.Close();
        }
    }
}
